<?php
$id=$_POST['id'];
$a=$_POST['id_title'];
$b=$_POST['id_user'];
$c=$_POST['content'];
$d=$_POST['zt'];

@mysql_connect('localhost', 'root', 'root');
if (mysql_errno()) {
	die(mysql_errno());
}
mysql_select_db('blog');
mysql_set_charset('utf8');
$sql="update liuyan set `id_title`='$a',`id_user`='$b',`content`='$c' ,`zt`='$d' where id=$id ";

$res=mysql_query($sql);

if ($res) {
    echo "<script>alert('修改成功');window.location.href='liuyan.php'</script>";
}
else{
    echo "<script>alert('修改失败');window.location.href='liuyan.php'</script>";
}

mysql_close();

?>